import React from 'react'
import {Navigate} from 'react-router-dom'
function HOClogin(Com:any) {
  return ()=>{
      const token=window.localStorage.getItem('token')
      if(!token){
        return <Navigate to='/login'></Navigate>
      }
    return <Com />
}
}

export default HOClogin
